package com.geo.geotool.base.entity;


import com.geo.geotool.base.enmu.RetCode;

/**
 * • @Description: 返回对象实体
 * • @author  : yell
 * • @date : 2021/10/27 17:06
 */
public class RetEntity<T> {
    public int code;

    private String msg;

    private T data;

    private boolean success;

    public RetEntity<T> setCode(RetCode retCode) {
        this.code = retCode.code;
        return this;
    }

    public int getCode() {
        return code;
    }

    public RetEntity<T> setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public RetEntity<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public RetEntity<T> setData(T data) {
        this.data = data;
        return this;
    }

    public RetEntity<T> setSuccess(boolean success) {
        this.success = success;
        return this;
    }
    public boolean getSuccess(){
        return success;
    }
}
